<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div  class="easyui-datagrid" id="msgGrid"></div>
<div id="msgToolbar">
	<div>
		<c:if test="${systemEntiy.roleId != 3}">
			<a href="#" class="easyui-linkbutton" onclick="msg.toolbar.showAddDialog();" data-options="
			iconCls:'icon-add',
			plain:true">
				新增  
			</a>
		</c:if>
	</div>
	<hr style="height:1px;border:none;border-top:1px dashed #0066CC;"/>
	<div>
		<strong>标题：</strong>
		<input type="text" name="msgSerachTitle" id="msgSerachTitle"/>
		<strong>　　类型：</strong>
		<select class="easyui-combobox" id = "msgSerachStyle" name="msgSerachStyle" data-options="
				panelHeight:'auto'
			">
			<option value="0">　全部 </option>
			<option value="1">我所发送 </option>
			<option value="2">其他发送</option>
		</select>
		
		<strong>　　发送角色：</strong>
		<select class="easyui-combobox" id = "msgSerachRole" name="msgSerachRole" data-options="
				panelHeight:'auto'
			">
			<option value="0">全部 </option>
			<option value="管理员">管理员</option>
			<option value="教师">教师</option>
			<option value="学员">学员</option>
		</select>
		<strong>　　消息状态：</strong>
		<select class="easyui-combobox" id = "msgSerachState" name="msgSerachState" data-options="
				panelHeight:'auto',
			">
			<option  value="0">全部 </option>
			<option value="1">启用</option>
			<option value="2">待启用</option>
			<option value="3">已删除</option>
		</select>
		<strong>　　是否过期：</strong>
		<select class="easyui-combobox" id = "msgSerachTime" name="msgSerachTime" data-options="
				panelHeight:'auto'
			">
			<option value="0">全部 </option>
			<option value="1">是 　</option>
			<option value="2">否　</option>
		</select>
		
		<a href="#" class="easyui-linkbutton" onclick="msg.btn.msgSerach()" data-options="
		iconCls:'icon-search',
		plain:true">
			查询
		</a>
	</div>
	<hr style="height:1px;border:none;border-top:1px dashed #0066CC;"/>
</div>

<div id="msgDetailDialog" class="easyui-dialog msg-add" style="width:350px" data-options="
title:'站内消息详情',
buttons:'#msgDetailButtons',
closed: true">
	<form id="msgDetailForm" style="text-align: center" method="post">
		<input type="hidden" name="id" id="msgDetailFormId"/>
		<p>
			<strong>标　　题：</strong>
			<input type="text" name="title" id="msgDetailFormTitle" class="easyui-validatebox" readonly="readonly">
		</p>
		<p>
			<strong>内　　容：</strong>
			<input name="content" class="easyui-textbox" id="msgDetailFormContent" data-options="multiline:true" style="width:178px;height:100px" readonly="readonly">
		</p>
		<p>
			<strong>发送人员：</strong>
			<input type="text" name="sendMan"  class="easyui-validatebox" readonly="readonly">
		</p>
		<p>
			<strong>发送角色：</strong>
			<input type="text" name="sendRole"  class="easyui-validatebox" readonly="readonly">
		</p>
		<p>
			<strong>发送时间：</strong>
			<input type="text" name="sendTime" class="easyui-datetimebox"  readonly="readonly">
		</p>
		<p>
			<strong>过期时间：</strong>
			<input type="text" name="expireTime" id="msgDetailFormExpireTime"  class="easyui-datetimebox"  readonly="readonly">
		</p>
		<p id="clazzP">
			<strong>接收人员：</strong>
			<input name="receiveClazz" class="easyui-combobox msgDetailFormReceiveClazz">
		</p>
		<p>
			<strong>状　　态：</strong>
			<input type="text" name="state" id="msgDetailFormState"  class="easyui-validatebox"  readonly="readonly">
		</p>
	</form>
</div>
<div id="msgDetailButtons" style="text-align: center">
	<a href="#" onclick="msg.btn.updateMsg()" id="updateBtn" class="easyui-linkbutton" data-options="
	iconCls: 'icon-edit',
	plain: true">
		修改
	</a>
	<a href="#" onclick="msg.btn.hiddenDetailDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-cancel',
	plain: true">
		取消
	</a>
</div>


<div id="msgUpdateDialog" class="easyui-dialog " style="width:350px" data-options="
title:'站内消息修改',
buttons:'#msgUpdateButtons',
closed: true">
	<form id="msgUpdateForm" style="text-align: center" method="post">
		<input type="hidden" name="id"  id="msgUpdateFormId"/>
		<p>
			<strong>标　　题：</strong>
			<input type="text" name="title"  class="easyui-validatebox msgUpdateFormTitle" >
		</p>
		<p>
			<strong>内　　容：</strong>
			<input name="content" class="easyui-textbox msgUpdateFormContent" data-options="multiline:true" style="width:178px;height:100px" >
		</p>
		<p>
			<strong>过期时间：</strong>
			<input name="expireTime" class="easyui-datetimebox msgUpdateFormExpireTime"  >
		</p>
		<p>
			<strong>接收人员：</strong>
			<input  name="msgUpdateFormReceiveMan"  class="easyui-combobox msgUpdateFormReceiveMan"  
			data-options="
					
				">
		</p>
		<p>
			<strong>状　　态：</strong>
			<select class="easyui-combobox" id = "msgUpdateFormState" name="state" data-options="
					panelHeight:'auto',
					width:172,
					required:true
				">
				<option value="1">启用 </option>
				<option value="2">待启用</option>
			</select>
		</p>
	</form>
</div>
<div id="msgUpdateButtons" style="text-align: center">
	<a href="#" onclick="msg.btn.submitUpdateMsg()" id="ensureUpdateBtn" class="easyui-linkbutton" data-options="
	iconCls: 'icon-edit',
	plain: true">
		确认修改
	</a>
	<a href="#" onclick="msg.btn.hiddenUpdateDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-cancel',
	plain: true">
		取消
	</a>
</div>

<div id="msgAddMsg" class="easyui-dialog msg-add" style="width:350px" data-options="
title: '新增站内消息',
buttons: '#msgAddMsgButtons',
closed: true
"><!-- onClose: msg.toolbar.resetUpdateFrom -->
	<form id="msgAddForm" style="text-align: center" method="post">
		<input type="hidden" name="id"/>
		<p>
			<strong>标　　题：</strong>
			<input type="text" name="title" id = "title" class="easyui-validatebox" data-options="required:true">
		</p>
		<p>
			<strong>内　　容：</strong>
			<input name="content" class="easyui-textbox" id = "content" data-options="multiline:true,required:true" style="width:178px;height:100px" >
		</p>
		<p>
			<strong>过期时间：</strong>
			<input  name="expireTime" id = "expireTime" class="easyui-datetimebox" data-options="
			value:'1/1/2015 23:59:59'" >
		</p>
		
		
		<p>
			<strong>接收人员：</strong>
			<input name="receiveMan" id = "receiveMan" class="easyui-combobox"  
			data-options="
					url:'<%=request.getContextPath()%>/AssistMsgServlet?command=listPerson',
					method:'post',
					valueField:'name',
					textField:'name',
					required:true,
					multiple:true,
					editable:false,
					panelHeight:'auto',
				">
		</p>
		<p>
			<strong>状　　态：</strong>
			<select class="easyui-combobox" name="state" data-options="
					panelHeight:'auto',
					width:172,
					required:true
				">
				<option value="1">启用 </option>
				<option value="2">待启用</option>
			</select>
		</p>
	</form>
</div>
<div id="msgAddMsgButtons" style="text-align: center">
	<a href="#" onclick="msg.btn.sureAddMsg();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-edit',
	plain: true">
		确认新增
	</a>
	<a href="#" onclick="msg.btn.hiddenAddMsgDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-cancel',
	plain: true">
		取消
	</a>
</div>
<script>
window.ctx = "<%=request.getContextPath() %>"
code ='${systemEntiy.code}'
</script>
<script src="<%=request.getContextPath()%>/static/common/msg.js"></script>
